package cn.tedu.practice01.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BMIController {
    @RequestMapping("/bmi01")
    public String b(Double h, Double w) {
        double bmi = w / (h * h);
        if (bmi <= 18.5) {
            return "偏瘦";
        } else if (bmi <= 27) {
            return "微胖";
        } else {
            return "有点胖了";
        }
    }

}
